import React, { Component } from 'react'
import RouterView from '../../router/routerView'
import {RouterInterface} from '../../router/router.d'
import MainCss from './main.module.scss'
import {NavLink} from 'react-router-dom'

interface Iprops{
    routes:RouterInterface[]
}

export default class Main extends Component<Iprops> {
    render() {
        return (
            <div className={MainCss.wrap}>
                <div className={MainCss.con}>
                    <RouterView routes={this.props.routes}></RouterView>
                </div>
               <footer className={MainCss.foot}>
                   <NavLink to="/main/home">首页</NavLink>
                   <NavLink to="/main/classify">分类</NavLink>
                   <NavLink to="/main/vip">vip</NavLink>
                   <NavLink to="/main/car">购物车</NavLink>
                   <NavLink to="/main/my">我的</NavLink>
               </footer>
            </div>
        )
    }
}
